import type { MockMethod } from 'vite-plugin-mock'
import Mock from 'mockjs'
const Random = Mock.Random

export interface File {
  id: string
  domain: string
  path: string
  size: string
  origin: string
  mime: string
  remark: string
}

export const FileTableRows = [
  {
    id: '1',
    domain: '',
    path: '',
    size: '',
    origin: '',
    remark: '',
    create_at: Random.datetime(),
    update_at: Random.datetime()
  }
]

export default [
  {
    url: '/mock-api/file/image',
    method: 'post',
    response({ body, file }) {
      //   console.log(body, file)
      return Random.image('200x200', Random.color(), Random.color(), 'i')
    }
  }
] as MockMethod[]
